<?php
  
  $table = "[php_property:table]";
  $where = "[php_property:where]";
  $paging = [php_property:paging];
  
    
  /*  $sql = "SELECT COUNT(1) FROM [php_property:table]";
    
    if ($where !== "") {
        $sql = $sql." WHERE $where";
    }
  
  
  $pagingCount = db::getValue($sql); */ 
  $pagingCount = db::getCount($table, $where);
  //$pagingCount = data::getCount();
  
  //db::getCount()
  
   

  $pagingFrom = 1;
  if (isset($_REQUEST[$table . '_start']))
    $pagingFrom=$_REQUEST[$table . '_start']+1;
  
  $pagingTo = ($pagingFrom+$paging)-1;
  
  if ($pagingTo > $pagingCount) {
      $pagingTo = $pagingCount;
  }
  
?>
